/*
day383 
2020.9.14 
*/
#include<iostream>
#include<vector>
using namespace std;

class Solution {
public:
    vector<int> decompressRLElist(vector<int>& nums) {
    	vector<int> res;
    	
		for(int i=0;i<nums.size()-1;i+=2)
		{
			cout<<i<<endl;
			int freq=nums[i],val=nums[i+1];
			for(int j=0;j<freq;++j)
			{
				res.push_back(val);
			}
		}
		
		return res;
    }
};

int main()
{
	Solution s;
	vector<int> nums={1,2,3,4};
	s.decompressRLElist(nums) ;
	return 0;
 } 
